import Layout from "@/layout/index.vue";
import WebLayout from "@/layout/webLayout.vue";

const defaultRoutes = [
  // 后台
  {
    path: '/',
    redirect: '/webHome',
    component: Layout,
    children: [
      // 共享信息管理
      // 内容管理
      {
        path: '/facilities',
        name: 'facilities',
        component: () => import("@/views/Information/content/facilities/facilities.vue"),
        meta: {
          title: "科研设施信息",
        },
      },
      {
        path: '/facilitiesInfo',
        name: 'facilitiesInfo',
        component: () => import("@/views/Information/content/facilities/common/addInfo.vue"),
        meta: {
          title: "采集科研设施信息",
        },
      },
      {
        path: '/instrument',
        name: 'instrument',
        component: () => import("@/views/Information/content/instrument/instrument.vue"),
        meta: {
          title: "仪器设备信息",
        },
      },
      {
        path: '/instrumentInfo',
        name: 'instrumentInfo',
        component: () => import("@/views/Information/content/instrument/common/addInfo.vue"),
        meta: {
          title: "采集仪器设备信息",
        },
      },
      {
        path: '/software',
        name: 'software',
        component: () => import("@/views/Information/content/software/software.vue"),
        meta: {
          title: "软件系统信息",
        },
      },
      {
        path: '/softwareInfo',
        name: 'softwareInfo',
        component: () => import("@/views/Information/content/software/common/addInfo.vue"),
        meta: {
          title: "采集软件系统信息",
        },
      },
      // 地方信息管理
      {
        path: '/localResources',
        name: 'localResources',
        component: () => import("@/views/Information/content/localResources/localResources.vue"),
        meta: {
          title: "综合信息管理",
        },
      },
      // 综合信息管理
      {
        path: '/synthesisInfo',
        name: 'synthesisInfo',
        component: () => import("@/views/Information/synthesisInfo/synthesisInfo.vue"),
        meta: {
          title: "共享管理信息",
        },
      },
      // 信息发布
      {
        path: '/servicePublish',
        name: 'servicePublish',
        component: () => import("@/views/Information/contentPublish/servicePublish/servicePublish.vue"),
        meta: {
          title: "共享资源信息发布",
        },
      },
      {
        path: '/localServicePublish',
        name: 'localServicePublish',
        component: () => import("@/views/Information/contentPublish/localServicePublish/localServicePublish.vue"),
        meta: {
          title: "地方资源信息发布",
        },
      },
      {
        path: '/synthesisInfoPublish',
        name: 'synthesisInfoPublish',
        component: () => import("@/views/Information/contentPublish/synthesisInfoPublish/synthesisInfoPublish.vue"),
        meta: {
          title: "共享管理信息发布",
        },
      },
      // 信息服务
      {
        path: '/adviceManage',
        name: 'adviceManage',
        component: () => import("@/views/Information/serviceManage/adviceManage/adviceManage.vue"),
        meta: {
          title: "建言献策服务管理",
        },
      },
      {
        path: '/consultManage',
        name: 'consultManage',
        component: () => import("@/views/Information/serviceManage/consultManage/consultManage.vue"),
        meta: {
          title: "服务咨询管理",
        },
      },
      {
        path: '/makeManage',
        name: 'makeManage',
        component: () => import("@/views/Information/serviceManage/makeManage/makeManage.vue"),
        meta: {
          title: "服务预约管理",
        },
      },
      {
        path: '/recordLog',
        name: 'recordLog',
        component: () => import("@/views/Information/serviceManage/recordLog/recordLog.vue"),
        meta: {
          title: "服务记录管理",
        },
      },
      {
        path: '/localRecordLog',
        name: 'localRecordLog',
        component: () => import("@/views/Information/serviceManage/localRecordLog/localRecordLog.vue"),
        meta: {
          title: "地方共享使用情况",
        },
      },
      // 评价考核
      {
        path: '/evaluateInfo',
        name: 'evaluateInfo',
        component: () => import("@/views/Information/evaluatePge/evaluateInfo/evaluateInfo.vue"),
        meta: {
          title: "评价考核",
        },
      },
      {
        path: '/selfEvaluation',
        name: 'selfEvaluation',
        component: () => import("@/views/Information/evaluatePge/selfEvaluation/selfEvaluation.vue"),
        meta: {
          title: "自评信息",
        },
      },
      // 单位管理
      {
        path: '/largeUnits',
        name: 'largeUnits',
        component: () => import("@/views/unitManagement/largeUnits/largeUnits.vue"),
        meta: {
          title: "大单位职能部门",
        },
      },
      {
        path: '/managementUnit',
        name: 'managementUnit',
        component: () => import("@/views/unitManagement/managementUnit/managementUnit.vue"),
        meta: {
          title: "管理单位信息",
        },
      },
    ]
  },
  // 系统设置
  {
    path: '/setting',
    component: Layout,
    meta: {
      title: "系统设置"
    },
    children: [
      {
        path: '/post',
        name: 'Post',
        component: () => import("@/views/setting/post/index.vue"),
        meta: {
          title: "机构管理",
          breadCrumb: [{
            title: '机构管理'
          }]
        },
      },
      // 用户管理
      {
        path: '/users',
        name: 'Users',
        component: () => import("@/views/setting/users/users.vue"),
        meta: {
          title: "用户管理",
          breadCrumb: [{
            title: '用户管理'
          }]
        },
      },
      // 角色管理
      {
        path: '/role',
        name: 'Roles',
        component: () => import("@/views/setting/role/index.vue"),
        meta: {
          title: "角色管理",
          breadCrumb: [{
            title: '角色管理'
          }]
        },
      },
      // 菜单管理
      {
        path: '/menu',
        name: 'Menus',
        component: () => import("@/views/setting/menus/index.vue"),
        meta: {
          title: "菜单管理",
          breadCrumb: [{
            title: '菜单管理'
          }]
        },
      },
      {
        path: '/param',
        name: 'Param',
        component: () => import("@/views/setting/param/index.vue"),
        meta: {
          title: "参数配置",
          breadCrumb: [{
            title: '参数配置'
          }]
        },
      },
      // 字典管理
      {
        path: '/dict',
        name: 'Dicts',
        component: () => import("@/views/setting/dict/index.vue"),
        meta: {
          title: "数据字典维护",
          breadCrumb: [{
            title: '数据字典维护'
          }]
        },
      },
      // 日志管理
      {
        path: '/log',
        name: 'Log',
        component: () => import("@/views/setting/logs/logs.vue"),
        meta: {
          title: "日志管理",
          breadCrumb: [{
            title: '日志管理'
          }]
        },
      },
      {
        path: '/tempManager',
        name: 'TempManager',
        component: () => import("@/views/setting/tempManager/index.vue"),
        meta: {
          title: "模板服务",
          breadCrumb: [{
            title: '模板服务'
          }]
        },
      },
      {
        path: '/backup',
        name: 'BackUp',
        component: () => import("@/views/setting/backup/index.vue"),
        meta: {
          title: "备份恢复",
          breadCrumb: [{
            title: '备份恢复'
          }]
        },
      },
    ]
  },

  // 项目态势
  {
    path: '/statisticsPage',
    name: 'statisticsPage',
    component: () => import("@/views/statisticsPage/statisticsPage.vue"),
    meta: {
      title: "项目态势",
    },
  },
  // 全军共享态势
  {
    path: '/equipmentChart',
    name: 'equipmentChart',
    component: () => import("@/views/equipmentChart/equipmentChart.vue"),
    meta: {
      title: "全军共享态势",
    },
  },
  // 大单位共享态势
  {
    path: '/largeUnitsChart',
    name: 'largeUnitsChart',
    component: () => import("@/views/largeUnitsChart/largeUnitsChart.vue"),
    meta: {
      title: "大单位共享态势",
    },
  },
  // 管理单位统计分析
  {
    path: '/adminUnitsChart',
    name: 'adminUnitsChart',
    component: () => import("@/views/adminUnitsChart/adminUnitsChart.vue"),
    meta: {
      title: "管理单位共享态势",
    },
  },
  // 前台
  {
    path: '/web',
    redirect: '/webHome',
    component: WebLayout,
    children: [
      // 首页
      {
        path: '/webHome',
        name: 'WebHome',
        component: () => import("@/views/home/home.vue"),
        meta: {
          title: "首页",
        },
      },
      // 科研设施
      {
        path: '/keyansheshi',
        name: 'Keyansheshi',
        component: () => import("@/views/home/keyansheshi.vue"),
        meta: {
          title: "科研设施",
        },
      },
      // 仪器设备
      {
        path: '/yiqishebei',
        name: 'Yiqishebei',
        component: () => import("@/views/home/yiqishebei.vue"),
        meta: {
          title: "仪器设备",
        },
      },
      // 地方资源
      {
        path: '/difangziyuan',
        name: 'Difangziyuan',
        component: () => import("@/views/home/difangziyuan.vue"),
        meta: {
          title: "地方资源",
        },
      },
      // 软件系统
      {
        path: '/ruanjianxitong',
        name: 'Ruanjianxitong',
        component: () => import("@/views/home/ruanjianxitong.vue"),
        meta: {
          title: "软件系统",
        },
      },
      // 政策法规
      {
        path: '/lawInfo',
        name: 'LawInfo',
        component: () => import("@/views/home/lawInfo.vue"),
        meta: {
          title: "政策法规",
        },
      },
      // 通知公告
      {
        path: '/message',
        name: 'Message',
        component: () => import("@/views/home/message.vue"),
        meta: {
          title: "通知公告",
        },
      },
      // 工作动态
      {
        path: '/jobMessage',
        name: 'JobMessage',
        component: () => import("@/views/home/jobMessage.vue"),
        meta: {
          title: "工作动态",
        },
      },
      // 仪器维修
      {
        path: '/yiqiweixiu',
        name: 'Yiqiweixiu',
        component: () => import("@/views/home/yiqiweixiu.vue"),
        meta: {
          title: "工作动态",
        },
      },
      // 平台指南
      {
        path: '/interaction',
        name: 'Interaction',
        component: () => import("@/views/home/interaction.vue"),
        meta: {
          title: "平台指南",
        },
      },
      // 全文检索
      {
        path: '/allSearch',
        name: 'AllSearch',
        component: () => import("@/views/home/allSearch.vue"),
        meta: {
          title: "全文检索",
        },
      },
      // 服务指南
      {
        path: '/fuwuzhinan',
        name: 'Fuwuzhinan',
        component: () => import("@/views/home/fuwuzhinan.vue"),
        meta: {
          title: "服务指南",
        },
      },
      // 用户中心
      {
        path: '/personalPage',
        name: 'PersonalPage',
        component: () => import("@/views/personalPage/personalPage.vue"),
        meta: {
          title: "用户中心",
        },
      },
      {
        path: '/detailPage',
        name: 'detailPage',
        component: () => import("@/views/detailPage/detailPage.vue"),
        meta: {
          title: "设施仪器详情页面",
        },
      },
      {
        path: '/yiqiDetailPage',
        name: 'yiqiDetailPage',
        component: () => import("@/views/detailPage/yiqiDetailPage.vue"),
        meta: {
          title: "仪器设备详情页面",
        },
      },
      {
        path: '/softDetailPage',
        name: 'softDetailPage',
        component: () => import("@/views/detailPage/softDetailPage.vue"),
        meta: {
          title: "软件系统详情页面",
        },
      },
    ]
  },
  {
    path: '/login',
    component: (resolve) => require(['@/views/login'], resolve),
    hidden: true
  },
  {
    path: "/error",
    name: "Error",
    component: Layout,
    children: [{
      path: '/404',
      component: (resolve) => require(['@/views/error/404'], resolve),
      hidden: true
    },
    {
      path: '/400',
      component: (resolve) => require(['@/views/error/400'], resolve),
      hidden: true
    },
    ]
  }
]

export default defaultRoutes;
